import React, { PureComponent } from "react"
import { connect } from "../hoc/connect"
import { addNumber } from "../store/features/counter"
export class About extends PureComponent {
    constructor(props) {
        super(props)
    }

    render() {
        const { counter } = this.props
        return <div>About Counter: {counter}</div>
    }
}

const mapStateToProps = (state) => ({
    counter: state.counter.counter,
})

const mapDispatchToProps = (dispatch) => ({
    addNumber(num) {
        dispatch(addNumber(num))
    },
})

export default connect(mapStateToProps, mapDispatchToProps)(About)
